#include <QtGui>
#include "query.h"

Query::Query(QWidget *parent) : QLineEdit(parent) {
  // Prevent lumping keys together
  setAttribute(Qt::WA_KeyCompression, false);
}

void Query::keyPressEvent(QKeyEvent * e) {
  switch(e->key()) {
    case Qt::Key_Slash:
    case Qt::Key_Question:
    case Qt::Key_AsciiTilde:
    case Qt::Key_Space: emit specialKeyPressed(e);
                        break;
    default: QLineEdit::keyPressEvent(e);
             break;
  }
}
